var gulp = require('gulp');
var postcss = require('gulp-postcss');
var pxtorem = require('postcss-pxtransform');

gulp.task('css', function () {
    var processors = [
        pxtorem({
            platform: 'weapp',
            designWidth: 750,
        })
    ];
    return gulp.src(['miniprogram_npm/@vant/weapp/**/*.wxss']).pipe(postcss(processors)).pipe(gulp.dest('miniprogram_npm/@vant/weapp/'));
});

/**
 * postcss-pxtransform index.js
 const deviceRatio = {
    640: 2.34,
    750: 2,
    828: 1.81
  }
 */